﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using com.qbengo.utility.nodepicker.DAL;
using com.qbengo.utility.nodepicker.business;
using com.qbengo.utility.nodepicker.entity;

namespace com.qbengo.utility.nodepicker
{
    public partial class EventInfoForm : Form
    {
        VenueInfoForm venueInfoForm;

        EventTimetableBLL eventTimetableBLL = new EventTimetableBLL();
        public EventInfoForm()
        {
            InitializeComponent();
            //this.DialogResult = DialogResult.OK;
            

            //MessageBox.Show(venueInfoForm.current_event_id+"");
        }



        private void button1_Click(object sender, EventArgs e)
        {
            venueInfoForm = (VenueInfoForm)this.Owner;
            MessageBox.Show(venueInfoForm.current_event_id+"");

        }

        private void EventInfoForm_Load(object sender, EventArgs e)
        {
            venueInfoForm = (VenueInfoForm)this.Owner;
            BindingSource eventTimetableBindingSource = new BindingSource();
            List<EventTimetable> eventTimetableList = eventTimetableBLL.DataTableToList(eventTimetableBLL.GetList("eventid=" + venueInfoForm.current_event_id).Tables[0]);
            eventTimetableBindingSource.DataSource = eventTimetableList;
            this.TimetableDataGrid.DataSource = eventTimetableBindingSource;

        }
    }
}
